package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ControlsTypes generated by hbm2java
 */
@Entity
@Table(name="controls_types"
    ,catalog="madr_bd10"
)
public class ControlsTypes  implements java.io.Serializable {


     private Integer idConTyp;
     private String nameConType;
     private Boolean statusConTyp;
     private Set cropsTypeses = new HashSet(0);
     private Set controlses = new HashSet(0);

    public ControlsTypes() {
    }

	
    public ControlsTypes(String nameConType) {
        this.nameConType = nameConType;
    }
    public ControlsTypes(String nameConType, Boolean statusConTyp, Set cropsTypeses, Set controlses) {
       this.nameConType = nameConType;
       this.statusConTyp = statusConTyp;
       this.cropsTypeses = cropsTypeses;
       this.controlses = controlses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_con_typ", unique=true, nullable=false)
    public Integer getIdConTyp() {
        return this.idConTyp;
    }
    
    public void setIdConTyp(Integer idConTyp) {
        this.idConTyp = idConTyp;
    }
    
    @Column(name="name_con_type", nullable=false, length=45)
    public String getNameConType() {
        return this.nameConType;
    }
    
    public void setNameConType(String nameConType) {
        this.nameConType = nameConType;
    }
    
    @Column(name="status_con_typ")
    public Boolean getStatusConTyp() {
        return this.statusConTyp;
    }
    
    public void setStatusConTyp(Boolean statusConTyp) {
        this.statusConTyp = statusConTyp;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="controls_types_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_control_type_con_typ_cro", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_con_typ_cro", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="controlsTypes")
    public Set getControlses() {
        return this.controlses;
    }
    
    public void setControlses(Set controlses) {
        this.controlses = controlses;
    }




}


